package IC.Types;


/**
 * A base abstract class represent the type of the symbols in the symbol table. 
 */
public abstract class Type {
	
	protected static int uniqueIdCounter = 1;	
	private final int ID;		//Each type has a unique Id (Integer)
	
	//C'tor
	public Type() {
		this.ID = uniqueIdCounter++;
	}
	
	abstract public boolean isSuitForArray();
	abstract public boolean isClass();
	abstract public boolean isMethod();
	abstract public boolean isPrimitive();
	abstract public boolean isArray();
	
	public int getID() {
		return ID;
	}
	
	public boolean InstanceOf(Type type) {
		return this == type;
	}


}
